package 函数式接口;

import java.util.function.Supplier;

/**
 * Supplier 供给型接口
 * 没有参数，只有返回值
 */
public class SupplierDemo {
    public static void main(String[] args) {
        Supplier<String> supplier = new Supplier<>() {
            @Override
            public String get() {
                return null;
            }
        };

        Supplier<String> supplier1 = () -> "123";
        System.out.println(supplier1.get());
    }
}
